package com.juicygames.framework.gamepart;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.ListIterator;

public class GameGroup<PartTypeParam extends GamePart> extends GamePart implements List<PartTypeParam> {
	
	List<PartTypeParam> parts;

	public GameGroup() {
		super();
		parts = new ArrayList<PartTypeParam>();
	}

	public boolean add(PartTypeParam object) {
		addPart(object);
		return parts.add(object);
	}

	public void add(int location, PartTypeParam object) {
		parts.add(location,object);
		
	}

	public boolean addAll(Collection<? extends PartTypeParam> arg0) {
		return parts.addAll(arg0);
	}

	public boolean addAll(int arg0, Collection<? extends PartTypeParam> arg1) {
		return parts.addAll(arg0,arg1);
	}

	public void clear() {
		parts.clear();
	}

	public boolean contains(Object object) {
		return parts.contains(object);
	}

	public boolean containsAll(Collection<?> arg0) {
		return parts.containsAll(arg0);
	}

	public PartTypeParam get(int location) {
		return parts.get(location);
	}

	public int indexOf(Object object) {
		return parts.indexOf(object);
	}

	public boolean isEmpty() {
		return parts.isEmpty();
	}

	public Iterator<PartTypeParam> iterator() {
		return parts.iterator();
	}

	public int lastIndexOf(Object object) {
		return parts.lastIndexOf(object);
	}

	public ListIterator<PartTypeParam> listIterator() {
		return parts.listIterator();
	}

	public ListIterator<PartTypeParam> listIterator(int location) {
		return parts.listIterator(location);
	}

	public PartTypeParam remove(int location) {
		return parts.remove(location);
	}

	public boolean remove(Object object) {
		return parts.remove(object);
	}

	public boolean removeAll(Collection<?> arg0) {
		return parts.removeAll(arg0);
	}

	public boolean retainAll(Collection<?> arg0) {
		return parts.retainAll(arg0);
	}

	public PartTypeParam set(int location, PartTypeParam object) {
		return parts.set(location, object);
	}

	public int size() {
		return parts.size();
	}

	public List<PartTypeParam> subList(int start, int end) {
		return parts.subList(start, end);
	}

	public Object[] toArray() {
		return parts.toArray();
	}

	public <T> T[] toArray(T[] array) {
		return parts.toArray(array);
	}

}
